package model;

import java.util.Vector;

public class Class {
	private String name;
	private int oX, oY, sizeX, sizeY;
	private Vector<Attribute> attributes;
	private Vector<Operation> operations;

	public Class() {
		this.name = null;
		this.oX = this.oY = this.sizeX = this.sizeY = 0;
		initLists();
	}

	public Class(String nameIn) {
		this.name = nameIn;
		this.oX = this.oY = this.sizeX = this.sizeY = 0;
		initLists();
	}

	private void initLists() {
		attributes = new Vector<Attribute>();
		operations = new Vector<Operation>();
	}

	public void addAttribute(String nameIn, String typeIn, char visIn) {
		Attribute atIn = new Attribute(nameIn, typeIn, visIn);
		attributes.add(atIn);
	}

	public void addOperation(String nameIn, String typeIn, char visIn) {
		Operation opIn = new Operation(nameIn, typeIn, visIn);
		operations.add(opIn);
	}
	
	public Vector<Operation> getOperations(){
		return operations;
	}
	
	public Vector<Attribute> getAttributes(){
		return attributes;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getoX() {
		return oX;
	}

	public void setoX(int oX) {
		this.oX = oX;
	}

	public int getoY() {
		return oY;
	}

	public void setoY(int oY) {
		this.oY = oY;
	}

	public int getSizeX() {
		return sizeX;
	}

	public void setSizeX(int sizeX) {
		this.sizeX = sizeX;
	}

	public int getSizeY() {
		return sizeY;
	}

	public void setSizeY(int sizeY) {
		this.sizeY = sizeY;
	}
	
	public void setAttributes(Vector<Attribute> attributesIn){
		this.attributes = attributesIn;
	}
	
	public void setOperations(Vector<Operation> operationsIn){
		this.operations = operationsIn;
	}
}
